package boogui.db;

public class MovieRegistrySQL {
	
	// 등록된 전체 지역 조회
	private String allLocationSQL = "select distinct location from cinema";
	// 특정 지역의 영화관 조회
	private String cinemaSQL = "select distinct cinename from cinema where location = ?";
	// 특정 영화관의 상영관 조회
	private String theaterSQL = "select theater from cinema where cinename = ?";
	// 영화 정보 등록
	private String insertMovieSQL = "insert into movies values (movie.nextval,?,?,?,?,?,?,?,?,?,?,to_date(?,'YYYYMMDD'),?,?,?)";
	// 상영 정보 등록
	private String insertShowingSQL = "insert into showing values (movie.nextval,"
			+ "(select movno from movies where title= ? ),"
			+ "(select cineno from cinema where location = ? and cinename = ?"
			+ " and theater = ?), ?, to_date( ?, 'YYYYMMDD'), 180, 180)";
	// 상영 번호 조회
	private String selectShownoSQL = "select showno from showing order by showno asc";	
	// 상영 여부 변경
	private String isPlaySQL = "update movies set isplay = 'Y' where title = ?";
	// 영화 제목 조회 (전체)
	private String selectMovieSQL = "select title from movies";

	
	public String getSelectShownoSQL() {
		return selectShownoSQL;
	}

	public void setSelectShownoSQL(String selectShownoSQL) {
		this.selectShownoSQL = selectShownoSQL;
	}

	public String getIsPlaySQL() {
		return isPlaySQL;
	}

	public void setIsPlaySQL(String isPlaySQL) {
		this.isPlaySQL = isPlaySQL;
	}	
	
	public String getSelectMovieSQL() {
		return selectMovieSQL;
	}

	public void setSelectMovieSQL(String selectMovieSQL) {
		this.selectMovieSQL = selectMovieSQL;
	}

	public String getInsertShowingSQL() {
		return insertShowingSQL;
	}

	public void setInsertShowingSQL(String insertShowingSQL) {
		this.insertShowingSQL = insertShowingSQL;
	}

	public String getInsertMovieSQL() {
		return insertMovieSQL;
	}

	public void setInsertMovieSQL(String insertMovieSQL) {
		this.insertMovieSQL = insertMovieSQL;
	}

	public String getTheaterSQL() {
		return theaterSQL;
	}

	public void setTheaterSQL(String theaterSQL) {
		this.theaterSQL = theaterSQL;
	}

	public String getCinemaSQL() {
		return cinemaSQL;
	}

	public void setCinemaSQL(String cinemaSQL) {
		this.cinemaSQL = cinemaSQL;
	}

	public String getAllLocationSQL() {
		return allLocationSQL;
	}

	public void setAllLocationSQL(String allLocationSQL) {
		this.allLocationSQL = allLocationSQL;
	}

}
